import { defineStore } from 'pinia'

export interface Info {
   id: string,
   username: string,
   role: string,
   phone: string,
   email: string,
   lastLoginTime: string
}
export interface State {
   info: Info;
}

export const useStore = defineStore("main", {
   state: (): State => {
      return {
         info: {
            id: '',
            username: '',
            role: '',
            phone: '',
            email: '',
            lastLoginTime: ''
         },
      }
   },
   actions: {
      changeState(info: Info) {
         this.info = info
      }
   }
})


